package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.procurementmanagement.domain.ErpProductStock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ErpProductStockMapper;
import com.ruoyi.system.service.IErpProductStockService;

/**
 * 商品库存Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class ErpProductStockServiceImpl implements IErpProductStockService
{
    @Autowired
    private ErpProductStockMapper erpProductStockMapper;

    /**
     * 查询商品库存
     *
     * @param goods 商品库存主键
     * @return 商品库存
     */
    @Override
    public ErpProductStock selectErpProductStockById(String goods)
    {
        return erpProductStockMapper.selectErpProductStockById(goods);
    }

    /**
     * 查询商品库存列表
     *
     * @param erpProductStock 商品库存
     * @return 商品库存
     */
    @Override
    public List<ErpProductStock> selectErpProductStockList(ErpProductStock erpProductStock)
    {
        return erpProductStockMapper.selectErpProductStockList(erpProductStock);
    }

    /**
     * 新增商品库存
     *
     * @param erpProductStock 商品库存
     * @return 结果
     */
    @Override
    public int insertErpProductStock(ErpProductStock erpProductStock)
    {
        return erpProductStockMapper.insertErpProductStock(erpProductStock);
    }

    /**
     * 修改商品库存
     *
     * @param erpProductStock 商品库存
     * @return 结果
     */
    @Override
    public int updateErpProductStock(ErpProductStock erpProductStock)
    {
        return erpProductStockMapper.updateErpProductStock(erpProductStock);
    }

    /**
     * 批量删除商品库存
     *
     * @param ids 需要删除的商品库存主键
     * @return 结果
     */
    @Override
    public int deleteErpProductStockByIds(Long[] ids)
    {
        return erpProductStockMapper.deleteErpProductStockByIds(ids);
    }

    /**
     * 删除商品库存信息
     *
     * @param id 商品库存主键
     * @return 结果
     */
    @Override
    public int deleteErpProductStockById(Long id)
    {
        return erpProductStockMapper.deleteErpProductStockById(id);
    }
}
